package com.demo.xml.jaxb.bean;

import java.util.ArrayList;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

@SuppressWarnings("restriction")
// 设置元素名称
@XmlRootElement(name = "peoples")
// 设置根节点
@XmlAccessorType(XmlAccessType.FIELD)
public class ObjList {

	// 设置为上级节点属性
	@XmlAttribute(name = "size")
	private int size;

	//设置为 上级节点 子节点名称 默认是属性名
	@XmlElement(name = "people")
	private ArrayList<TestObj> objList;

	public int getSize() {
		return size;
	}

	public void setSize(int size) {
		this.size = size;
	}

	public ArrayList<TestObj> getObjList() {
		return objList;
	}

	public void setObjList(ArrayList<TestObj> objList) {
		this.objList = objList;
	}

}
